#include<stdio.h>
int main()
{
	int m;
	scanf("%d",&m);
	if(m<=15) printf("%.2f",4*m/3.0);
	else printf("%.2f",2.5*m-17.5);
	return 0;
}
